﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class VIPCustomerExchangeController
    {
        /// <summary>
        /// VIP客户兑换添加,
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="listDetail"></param>
        /// <returns>0表示失败,1表示成功</returns>
        public static int Add(VIPCustomerExchangeInfo obj, List<VIPCustomerExchangeDetailInfo> listDetail)
        {
            return VIPCustomerExchangeDAL.Add(obj,listDetail);
        }
       
        public static bool Delete(int CustExID)
        {
            return VIPCustomerExchangeDAL.Delete(CustExID);
        }
       
        public static List<VIPCustomerExchangeDetailInfo> GetAllDetail(int CustExID)
        {
            return CBO.FillCollection<VIPCustomerExchangeDetailInfo>(VIPCustomerExchangeDAL.GetAllDetail(CustExID));
        }
        public static VIPCustomerExchangeInfo GetList(int CustExID)
        {
            return CBO.FillObject<VIPCustomerExchangeInfo>( VIPCustomerExchangeDAL.GetList(CustExID));
        }
        public static DataTable GetPagination(string WhereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return VIPCustomerExchangeDAL.GetPagination(WhereSql, PageIndex, PageSize, Sort, ref  TotalCount);
        }
        public static bool UpdateVisit(int CustExID, bool IsVisit, DateTime VisitDate, string VisitRemark)
        {
            return VIPCustomerExchangeDAL.UpdateVisit(CustExID, IsVisit, VisitDate, VisitRemark);
        }

    }
}
